mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-19 10:01:24 +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)
|
if (nil == s)
|
||||||
{
|
{
|
||||||
/* Use few spaces so that more of the
|
/* Use few spaces so that more of the
|
||||||
* message fits into an Sms. */
|
* message fits into an Sms. Omit Timestamp */
|
||||||
s = @"{Server}({Host}):{Timestamp} {Type}-{Message}";
|
s = @"{Server}({Host}) {Type}-{Message}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[event->m setObject: s forKey: @"Replacement"];
|
[event->m setObject: s forKey: @"Replacement"];
|
||||||
|
@ -1771,21 +1771,11 @@ replaceFields(NSDictionary *fields, NSString *template)
|
||||||
NSEnumerator *e = [destinations objectEnumerator];
|
NSEnumerator *e = [destinations objectEnumerator];
|
||||||
NSString *d;
|
NSString *d;
|
||||||
NSString *s;
|
NSString *s;
|
||||||
NSString *t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform {field-name} substitutions, but to shorten the message
|
* Perform {field-name} substitutions.
|
||||||
* remove any Timestamp value from the dictionary.
|
|
||||||
*/
|
*/
|
||||||
t = RETAIN([m objectForKey: @"Timestamp"]);
|
|
||||||
[m removeObjectForKey: @"Timestamp"];
|
|
||||||
s = replaceFields(m, [m objectForKey: @"Replacement"]);
|
s = replaceFields(m, [m objectForKey: @"Replacement"]);
|
||||||
if (t != nil)
|
|
||||||
{
|
|
||||||
[m setObject: t forKey: @"Timestamp"];
|
|
||||||
RELEASE(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sms == nil)
|
if (sms == nil)
|
||||||
{
|
{
|
||||||
sms = [NSMutableDictionary new];
|
sms = [NSMutableDictionary new];
|
||||||
|
|
Loading…
Reference in a new issue