mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-16 00:21:01 +00:00
Fixup default SMS template to not include timestamp
This commit is contained in:
parent
8969536f35
commit
d5bf5edce1
1 changed files with 3 additions and 13 deletions
16
EcAlerter.m
16
EcAlerter.m
|
@ -1183,8 +1183,8 @@ replaceFields(NSDictionary *fields, NSString *template)
|
|||
if (nil == s)
|
||||
{
|
||||
/* Use few spaces so that more of the
|
||||
* message fits into an Sms. */
|
||||
s = @"{Server}({Host}):{Timestamp} {Type}-{Message}";
|
||||
* message fits into an Sms. Omit Timestamp */
|
||||
s = @"{Server}({Host}) {Type}-{Message}";
|
||||
}
|
||||
}
|
||||
[event->m setObject: s forKey: @"Replacement"];
|
||||
|
@ -1771,21 +1771,11 @@ replaceFields(NSDictionary *fields, NSString *template)
|
|||
NSEnumerator *e = [destinations objectEnumerator];
|
||||
NSString *d;
|
||||
NSString *s;
|
||||
NSString *t;
|
||||
|
||||
/*
|
||||
* Perform {field-name} substitutions, but to shorten the message
|
||||
* remove any Timestamp value from the dictionary.
|
||||
* Perform {field-name} substitutions.
|
||||
*/
|
||||
t = RETAIN([m objectForKey: @"Timestamp"]);
|
||||
[m removeObjectForKey: @"Timestamp"];
|
||||
s = replaceFields(m, [m objectForKey: @"Replacement"]);
|
||||
if (t != nil)
|
||||
{
|
||||
[m setObject: t forKey: @"Timestamp"];
|
||||
RELEASE(t);
|
||||
}
|
||||
|
||||
if (sms == nil)
|
||||
{
|
||||
sms = [NSMutableDictionary new];
|
||||
|
|
Loading…
Reference in a new issue